import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/mes-alert/strategy-message/page-query',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  });
};
export const getDetail = (id) => {
  return request({
    url: '/api/mes-alert/strategy-message/detail',
    method: 'get',
    params: {
      id
    }
  });
};
export const getAltStrategyType = () => {
  return request({
    url: '/api/blade-system/dict/dictionary?code=ALT_STRATEGY_TYPE',
    method: 'get'
  });
};
export const getModule = (metricType) => {
  return request({
    url: '/api/mes-alert/metric/module-key-value',
    method: 'get',
    params: {
      metricType
    }
  });
};

export const getMessageDetail = (id) => {
  return request({
    url: '/api/mes-alert/strategy-message/detail',
    method: 'get',
    params: {
      id
    }
  });
};

export const sendMessage = (data) => {
  return request({
    url: '/api/mes-alert/strategy-message/send-manual-sms-message',
    method: 'post',
    data: data
  });
};
